import request from '@/utils/request'
// import { getToken } from '@/utils/storage'

export const skillList = () => {
  return request({
    url: '/articles/technic'
  })
}

export const experienceList = () => {
  return request({
    url: '/articles/share'
  })
}

export const topSearch = () => {
  return request({
    url: '/articles/technicTopSearch'
  })
}

export const skillDetail = (id) => {
  return request({
    url: `/articles/technic/${id}`
  })
}

export const topShareSearch = () => {
  return request({
    url: '/articles/shareTopSearch'
  })
}

export const shareDetail = (id) => {
  return request({
    url: `/articles/share/${id}`
  })
}

export const articleComments = (id) => {
  return request({
    url: `/articles/comments/${id}`
  })
}

export const collectExp = data => {
  return request({
    url: '/articles/collect',
    method: 'post',
    data,
    flag: true
  })
}

export const starExp = data => {
  return request({
    url: '/articles/star',
    method: 'post',
    data,
    flag: true
  })
}

export const postComment = data => {
  return request({
    url: '/articles/comments',
    method: 'post',
    data,
    flag: true
  })
}

export const cityIndex = () => {
  return request({
    url: '/chart-data/indexes'
  })
}
